@extends('home.reset.reset_layout')
@section('title',$title)
@section('content')
	<div id="container">
	<div class="w">
        <div class="mod-main mod-comm">
            <div class="mt">
                <h3>找回密码</h3>
            </div>
            <div class="mc">
                <div id="sflex04" class="stepflex ">
                    <dl class="first doing">
                        <dt class="s-num">1</dt>
                        <dd class="s-text">填写电子邮箱<s></s><b></b></dd>
                        <dd></dd>
                    </dl>
                    <dl class="normal">
                        <dt class="s-num">2</dt>
                        <dd class="s-text">发送状态<s></s><b></b></dd>
                    </dl>
                    <dl class="normal">
                        <dt class="s-num">3</dt>
                        <dd class="s-text">设置新密码<s></s><b></b></dd>
                    </dl>
                    <dl class="last">
                        <dt class="s-num">&nbsp;</dt>
                        <dd class="s-text">完成<s></s><b></b></dd>
                    </dl>
                </div>

				<form action="/send" method="post">
					{{csrf_field()}}
						<div class="form formno" style="width: 65%;margin-left: 30%;">
	                    <div class="item">
	                        <span class="label">电子邮箱：</span>
	                        <div class="fl">
	                            <input type="email" class="itxt" id="email" name="email" value="">
                                <span class="btn-5" style="cursor:pointer">检测邮箱是否为注册邮箱</span>
	                            <div class="clr"></div>
	                            <label id="pass1" style="display:none;float:left;">您输入的邮箱地址尚未注册会员!</label>
                                <label id="pass2" style="display:none;float:left;">邮箱验证通过，请点提交按钮!</label>
                                <!-- <a id="pass1" style="display:none;float:left;">您输入的邮箱地址不合法或未注册会员!</a> -->
                                <!-- <a id="pass2" style="display:none;float:left;">邮箱验证通过，请点提交按钮!</a> -->
	                        </div>
	                        <div class="clr"></div>
	                   </div>     


	                    <div class="item">
	                        <span class="label">&nbsp;</span>
	                        <div class="fl">
	                            <!-- <a href="javascript:void(0);" class="btn-5" onclick="doIndex('7cdf472d-c074-430a-8c94-f0643297ad7d');" id="findPwdSubmit">提交</a> -->
	                            <input type="submit" value="提交"  id="btn" disabled="disabled">
	                        </div>
	                        <div class="clr"></div>
	                    </div>
				</form>

                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
        // // alert($);
        // //判断邮箱

        $("input[name='email']").on('blur',function(){
                $.post("/reset/email",{'_token':'{{csrf_token()}}','email':$("#email").val()},function(data)
                {
                        if(data == 2)
                        {
                            $("#pass1").css("display","block");
                            $("input[name='email']").on('focus',function(){
                                 $("#pass1").css("display","none");
                            });
                            $('#btn').attr("disabled",true);
                        }else if(data == 1){
                            $("#pass2").css("display","block");
                             $("input[name='email']").on('focus',function(){
                                 $("#pass2").css("display","none");
                            });
                            $('#btn').attr("disabled",false);
                        }
                });
        });

</script>
@endsection